﻿//-----------------------------------------------------------------------
// <copyright company="Microsoft Corporation">
//     Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.DevDiv.Wpf.Samples
{
    using System.Collections.Generic;

    public class LiveSearchImageResponse
    {
        public IEnumerable<LiveSearchImageResult> Results
        {
            get
            {
                return this.results =
                    (this.results ?? this.inner.GetCollection<LiveSearchImageResult>("./mms:Results/mms:ImageResult", LiveSearchImageResult.Create));
            }
        }

        internal static LiveSearchImageResponse Create(LiveSearchXmlObject inner)
        {
            return new LiveSearchImageResponse()
            {
                inner = inner
            };
        }

        private IEnumerable<LiveSearchImageResult> results;
        private LiveSearchXmlObject inner;
    }
}